#include "hashTable.h"

namespace bucketHash
{
	template <class K, class Hash = hash<K>>
	class unordered_set
	{
		struct SetKeyOfT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
	public:
		typedef typename hashTable<K, K, Hash, SetKeyOfT>::iterator iterator;

		iterator begin()
		{
			return _ht.begin();
		}

		iterator end()
		{
			return _ht.end();
		}

		pair<iterator, bool> insert(const K& key)
		{
			return _ht.insert(key);
		}

		bool erase(const K& key)
		{
			return _ht.erase(key);
		}

	private:
		hashTable<K, K, Hash, SetKeyOfT> _ht;
	};
}